//
//  WeexCallNative.m
//  MyWeeX
//
//  Created by 仓鼠_Z on 2018/11/20.
//  Copyright © 2018 LeHe. All rights reserved.
//

#import "WeexCallNative.h"

@interface WeexCallNative ()

@property (nonatomic, assign) int mynum;


@end

@implementation WeexCallNative
@synthesize weexInstance;
WX_EXPORT_METHOD(@selector(show:));
WX_EXPORT_METHOD(@selector(show:cback:))
-(void)show:(NSString *)str {
    WXLog(@"call me %@",str);
    WXLog(@"this is weexInstance %@ -- %@",weexInstance,[NSThread currentThread]);

}
-(void)show:(NSString *)str cback:(WXModuleKeepAliveCallback)callback{
   
    __weak typeof (self) weakSelf = self;
    self.mynum ++ ;
    WXLog(@"call me %@ %@",str,[NSThread currentThread]);
    callback(@{@"result":[NSString stringWithFormat:@"it is me time -%d",weakSelf.mynum]},false);
//    [weexInstance.viewController loadViewIfNeeded];
//
//    dispatch_queue_t main = dispatch_get_main_queue();
//    dispatch_async(main, ^{
//    });
}


@end
